package com.dmitriyp.movie.console;

import java.util.Scanner;

import com.dmitriyp.movie.dao.IMovieManager;

public abstract class AbstractUserAction implements IUserAction {

    private final IMovieManager manager;
    protected final Scanner scanner;

    public AbstractUserAction(IMovieManager manager) {
        if (manager == null)
            throw new IllegalArgumentException("Argument \'manager\' can not be null");

        this.manager = manager;
        this.scanner = new Scanner(System.in);
    }

    public IMovieManager getManager() {
        return manager;
    }

    public Scanner getScanner() {
        return scanner;
    }

}
